package org.xfy.ymcc.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.xfy.common.result.JsonResult;
import org.xfy.ymcc.domain.CourseDoc;
import org.xfy.ymcc.feign.fallback.SearchFeignClientFallbackFactory;

import java.util.List;

@FeignClient(value = "service-search",fallbackFactory = SearchFeignClientFallbackFactory.class)
public interface SearchFeignClient {
    @PostMapping("/search/saveSearch")
    JsonResult saveSearch(@RequestBody CourseDoc courseDoc);

    @PostMapping("/search/getCourse")
    JsonResult getCourse(@RequestBody List<Long> courseIds);
}
